drop table if exists jms_dwd.dwd_customer_detail_dt;
create external table jms_dwd.dwd_customer_detail_dt(
          input_time         timestamp  comment  '录入时间'
         ,input_date         string     comment  '录入日期'
         ,waybill_no         string     comment  '运单号'
         ,customer_name      string     comment  '客户名称'
         ,customer_code      string     comment  '客户code'
         ,attribute_id       string     comment  '客户属性'
         ,create_time        timestamp  comment  '客户签约年月'
         ,franchisee_code    string     comment  '寄件加盟商code'
         ,franchisee_name    string     comment  '寄件加盟商名称'
         ,agent_code         string     comment  '寄件代理区code'
         ,agent_name         string     comment  '寄件代理区名称'
         ,provider_id        bigint     comment  '寄件省份id'
         ,city_id            bigint     comment  '寄件城市id'
         ,area_id            bigint     comment  '寄件区县id'
         ,provider_desc      string     comment  '寄件省份'
         ,city_desc          string     comment  '寄件城市'
         ,area_desc          string     comment  '寄件区县'
         ,pick_network_code  string     comment  '寄件网点code'
         ,pick_network_name  string     comment  '寄件网点名称'
 )
 comment '客户货量综合统计明细表'
 partitioned by (dt string comment '更新/创建日期 (yyyy-mm-dd)')
 stored as parquet
 location '/dw/hive/jms_dwd.db/external/dwd_customer_detail_dt'
 tblproperties (
 'parquet.column.index.access'='true'
 );
